<extend name="Public:layout"/>
<block name="css">
    <link rel="stylesheet" href="__STATIC__/plugin/wangEditor/css/wangEditor.min.css">
</block>

<block name="js">
    <script type="text/javascript">
        var QINIU = $.parseJSON('{$qiniu|json_encode}');
    </script>
</block>
<block name="content">
    <div class="panel admin-panel">
        <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>缩略图设置</strong></div>
        <div>
            <foreach name="website" key="k" item="vo">
                <div class="tab-pane fade in" id="thumb_{$k}">
                    <form action="{:U('thumb')}" method="post" class="form ajax-submit">
                        <input type="hidden" name="article_id" value="{$article_id}">
                        <input type="hidden" name="website_id" value="{$k}">
                        <div class="row">
                            <div class="form-group col-lg-6 col-md-6">
                                <div class="col-lg-2 col-md-2 text-center">图片</div>
                                <div class="col-lg-10 col-md-10">
                                    <img src="{$thumb[$k]}" class="preview-upload" style="display:block;max-width:300px;">
                                    <input type="hidden" name="thumb" value="{$thumb[$k]}">
                                    <button type="button" class="btn btn-primary upload">上传图片</button>
                                    <button type="button" class="btn btn-info show-upload" data-ext="image" data-input="input[name=thumb]" data-preview=".preview-upload">已上传的图片</button>

                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="form-group col-lg-4 col-md-4">
                                <div class="col-lg-2 col-md-2 text-center"></div>
                                <div class="col-lg-3 col-md-3">
                                    <button type="submit" class="btn btn-success">保存</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </foreach>
        </div>
    </div>
</block>